package com.loan.system.create.service.impl;

import com.loan.common.utils.DateUtils;
import com.loan.system.create.domain.AssistPdfSearchWxBase;
import com.loan.system.create.mapper.AssistPdfSearchWxBaseMapper;
import com.loan.system.create.service.IAssistPdfSearchWxBaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * WX数据Service业务层处理
 *
 * @author Sophia
 * @date 2024-10-11
 */
@Service
public class AssistPdfSearchWxBaseServiceImpl implements IAssistPdfSearchWxBaseService {
    @Autowired
    private AssistPdfSearchWxBaseMapper assistPdfSearchWxBaseMapper;

    /**
     * 查询WX数据
     *
     * @param id WX数据主键
     * @return WX数据
     */
    @Override
    public AssistPdfSearchWxBase selectAssistPdfSearchWxBaseById(Long id) {
        return assistPdfSearchWxBaseMapper.selectAssistPdfSearchWxBaseById(id);
    }

    /**
     * 查询WX数据列表
     *
     * @param assistPdfSearchWxBase WX数据
     * @return WX数据
     */
    @Override
    public List<AssistPdfSearchWxBase> selectAssistPdfSearchWxBaseList(AssistPdfSearchWxBase assistPdfSearchWxBase) {
        return assistPdfSearchWxBaseMapper.selectAssistPdfSearchWxBaseList(assistPdfSearchWxBase);
    }

    /**
     * 新增WX数据
     *
     * @param assistPdfSearchWxBase WX数据
     * @return 结果
     */
    @Override
    public int insertAssistPdfSearchWxBase(AssistPdfSearchWxBase assistPdfSearchWxBase) {
        assistPdfSearchWxBase.setCreateTime(DateUtils.getNowDate());
        return assistPdfSearchWxBaseMapper.insertAssistPdfSearchWxBase(assistPdfSearchWxBase);
    }

    /**
     * 修改WX数据
     *
     * @param assistPdfSearchWxBase WX数据
     * @return 结果
     */
    @Override
    public int updateAssistPdfSearchWxBase(AssistPdfSearchWxBase assistPdfSearchWxBase) {
        assistPdfSearchWxBase.setUpdateTime(DateUtils.getNowDate());
        return assistPdfSearchWxBaseMapper.updateAssistPdfSearchWxBase(assistPdfSearchWxBase);
    }

    /**
     * 批量删除WX数据
     *
     * @param ids 需要删除的WX数据主键
     * @return 结果
     */
    @Override
    public int deleteAssistPdfSearchWxBaseByIds(Long[] ids) {
        return assistPdfSearchWxBaseMapper.deleteAssistPdfSearchWxBaseByIds(ids);
    }

    /**
     * 删除WX数据信息
     *
     * @param id WX数据主键
     * @return 结果
     */
    @Override
    public int deleteAssistPdfSearchWxBaseById(Long id) {
        return assistPdfSearchWxBaseMapper.deleteAssistPdfSearchWxBaseById(id);
    }

    @Override
    public Integer insertSearchBaseList(List<AssistPdfSearchWxBase> searchBaseList) {
        return assistPdfSearchWxBaseMapper.insertSearchBaseList(searchBaseList);
    }
}
